﻿<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
  <!-- Documenting T:NAnt.Core.Filters.FilterChain-->
  <head>
    <meta http-equiv="Content-Language" content="en-ca" />
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <link rel="stylesheet" type="text/css" href="../style.css" />
    <title>&lt;filterchain&gt; Type</title>
  </head>
  <body>
    <table width="100%" border="0" cellspacing="0" cellpadding="2" class="NavBar">
      <tr>
        <td class="NavBar-Cell">
          <a href="http://nant.sourceforge.net">
            <b>NAnt</b>
          </a>
          <img alt="-&gt;" src="../images/arrow.gif" />
          <a href="../index.html">Help</a>
          <img alt="-&gt;" src="../images/arrow.gif" />
          <a href="../types/index.html">Type Reference</a>
          <img alt="-&gt;" src="../images/arrow.gif" /> &lt;filterchain&gt;</td>
        <td class="NavBar-Cell" align="right">
                        v0.91-alpha2</td>
      </tr>
    </table>
    <h1>&lt;filterchain&gt;</h1>
    <p class="topicstatus">[This is preliminary documentation and subject to change.]</p>
    <p> Represent a chain of NAnt filters that can be applied to a <a href="../elements/NAnt.Core.Task.html">Task</a>. </p>
    <p> A FilterChain represents a collection of one or more filters that can be appled to a <a href="../elements/NAnt.Core.Task.html">Task</a> such as the <a href="../tasks/copy.html">&lt;copy&gt;</a> task. In the case of the <a href="../tasks/copy.html">&lt;copy&gt;</a> task, the contents of the copied files are filtered through each filter specified in the filter chain. Filtering occurs in the order the filters are specified with filtered output of one filter feeding into another. </p>
    <p> :--------:---&gt;:----------:---&gt;:----------: ... :----------:---&gt;:--------:<br xmlns=""></br> :.Source.:---&gt;:.Filter 1.:---&gt;:.Filter 2.: ... :.Filter n.:---&gt;:.target.:<br xmlns=""></br> :--------:---&gt;:----------:---&gt;:----------: ... :----------:---&gt;:--------:<br xmlns=""></br></p>
    <p> A list of all filters that come with NAnt is available <a href="../filters/index.html">here</a>. </p>
    <p> The following tasks support filtering with a FilterChain: </p>
    <ul style="list-style-type: disc;">
      <li>
        <a href="../tasks/copy.html">&lt;copy&gt;</a> task</li>
      <li>
        <a href="../tasks/move.html">&lt;move&gt;</a> task</li>
    </ul>
    <h3>Parameters</h3>
    <div class="table">
      <table>
        <tr>
          <th>Attribute</th>
          <th style="text-align: center;">Type</th>
          <th>Description</th>
          <th style="text-align: center;">Required</th>
        </tr>
        <tr>
          <td valign="top">encoding</td>
          <td style="text-align: center;">
            <a href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrfSystemTextEncodingClassTopic.asp">Encoding</a>
          </td>
          <td>
            <i>Deprecated.</i>  The encoding to assume when filter-copying files. The default is system's current ANSI code page. </td>
          <td style="text-align: center;">False</td>
        </tr>
        <tr>
          <td valign="top">id</td>
          <td style="text-align: center;">string</td>
          <td> The ID used to be referenced later. </td>
          <td style="text-align: center;">False</td>
        </tr>
        <tr>
          <td valign="top">refid</td>
          <td style="text-align: center;">string</td>
          <td> The ID to use as the reference. </td>
          <td style="text-align: center;">False</td>
        </tr>
      </table>
    </div>
    <h3>Nested Elements:</h3>
    <!--Array-->
    <!--NestedElementArray=T:NAnt.Core.Filters.Filter-->
    <h4>
      <a id="filter">
      </a>
                    &lt;filter&gt;
                </h4>
    <div class="nested-element"> The filters to apply. <p> Allows a file's content to be modified while performing an operation. </p><h3>Parameters</h3><div class="table"><table><tr><th>Attribute</th><th style="text-align: center;">Type</th><th>Description</th><th style="text-align: center;">Required</th></tr><tr><td valign="top">if</td><td style="text-align: center;">bool</td><td> If <b>true</b> then the filter will be used; otherwise, skipped. The default is <b>true</b>. </td><td style="text-align: center;">False</td></tr><tr><td valign="top">unless</td><td style="text-align: center;">bool</td><td> Opposite of <code>if</code>. If <b>false</b> then the filter will be executed; otherwise, skipped. The default is <b>false</b>. </td><td style="text-align: center;">False</td></tr></table></div></div>
    <h4>
      <a id="filter">
      </a>
                    &lt;/filter&gt;
                </h4>
    <h3>Examples</h3>
    <ul class="examples">
      <li>
        <p> Replace all occurrences of @NOW@ with the current date/time and replace tabs with spaces in all copied files. </p>
        <pre class="code">
&lt;property name="NOW" value="${datetime::now()}" /&gt;
&lt;copy todir="out"&gt;
    &lt;fileset basedir="in"&gt;
        &lt;include name="**/*" /&gt;
    &lt;/fileset&gt;
    &lt;filterchain&gt;
        &lt;replacetokens&gt;
            &lt;token key="NOW" value="${TODAY}" /&gt;
        &lt;/replacetokens&gt;
        &lt;tabstospaces /&gt;
    &lt;/filterchain&gt;
&lt;/copy&gt;
    </pre>
      </li>
    </ul>
    <h3>Requirements</h3>
    <div style="margin-left: 20px;">
      <b>Assembly:</b> NAnt.Core (0.91.3881.0)
            </div>
  </body>
</html>